home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / pcmail / main / kproto.ms < prev    next >
Encoding:
Text File  |  1994-06-05  |  3.0 KB  |  85 lines

  1. .TL
  2. uucp k protocol description
  3. .AU
  4. W.Z. Venema
  5. Eindhoven University of Technology
  6. .AE
  7. .NH
  8. Introduction
  9. .LP
  10. The k protocol has been developed for the Sytek Localnet local area
  11. network at the Eindhoven University of Technology (TUE).
  12. Main features of this network are:
  13. .IP     1
  14. Network partners may talk at different baudrates. This implies that the network
  15. does some buffering. This may cause timing
  16. problems (e.g. a system sending at 9600 baud to a system reading at 1200 baud).
  17. .IP     2
  18. The network needs a flow control mechanism. Usually this is
  19. based on the XON/XOFF protocol. Other control character sequences are used
  20. for commands to the network.
  21. .IP     3
  22. Some network stations are connected to telephone modems.
  23. .LP
  24. For these reasons, the k protocol must (i) cope with on XON/XOFF flow
  25. control, (ii) be suitable for 7-bit data paths, (iii) avoid
  26. control characters and (iv) provide reliable operation
  27. over telephone lines as well as over the local area network.
  28. .NH
  29. Packets
  30. .LP
  31. Data are sent as checksummed 256-byte packets, terminated by an
  32. ASCII CR. Except for the packet header (^P), the k protocol only uses
  33. ASCII codes 040 through 0137. Three data bytes are expanded to four
  34. bytes upon transmission. Theoretically, this reduces throughput by 25 percent.
  35. At 1200 baud, actual performances are:
  36. .DS
  37. uucp, g protocol    110 cps
  38. uucp, k protocol    74 cps
  39. c-kermit        67 cps
  40. .DE
  41. Note that the values for c-kermit are for text files, with repeat-count
  42. compression enabled.
  43. .PP
  44. The packet types are a subset of those used in the kermit programs:
  45. .DS
  46. D packets contain data.
  47. Y packets are sent when a correct data packet was received.
  48. N packets are sent when incorrect data was received.
  49. A packets are sent to shut down the k protocol.
  50. .DE
  51. A packet always begins with a header:
  52. .DS
  53. SOH     packet header, ASCII control-P
  54. len     (size of data, low 6 bits) + 32
  55. len     (size of data, high 6 bits) + 32
  56. num     (packet number mod 64) + 32
  57. type    packet type
  58. check   one-byte type-1 kermit checksum
  59. .DE
  60. .LP
  61. The header is followed by checksummed data if len > 0:
  62. .DS
  63. data    len data bytes
  64. check1  (upper 2 bits of type-3 kermit 16-bit checksum) + 32
  65. check2  (middle 6 bits of type-3 kermit 16-bit checksum) + 32
  66. check3  (lower 6 bits of type-3 kermit 16-bit checksum) + 32
  67. .DE
  68. .LP
  69. Every packet is followed by an ASCII carriage return, which is
  70. ignored upon reception of a packet. It prevents timeout errors
  71. when one byte gets lost (the most common case).
  72. .NH
  73. Handshake
  74. .LP
  75. Handshake is on a per-packet basis; a transmitter will not send
  76. another data packet before it knows that the receiver got the data
  77. in good condition. There are various ways to obtain that knowledge:
  78. the receiver may send an ACK message (usual case), or a NAK for
  79. the next data packet, or a data packet with the next sequence number.
  80. .PP
  81. The protocol is aborted when an unexpected
  82. packet type or when a packet out of sequence is received.
  83. Since 'A' packets are never expected, they always cause a protocol
  84. fault.
  85.